package Day2025_03_26;

import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        if (n == 1) System.out.println(1);
        else if (n == 2) System.out.println(2);
        else {
            long a = 1, b = 2, c = 0;
            for (int i = 2; i < n; i++) {
                c = a + b;
                a = b;
                b = c;
            }
            System.out.println(c);
        }
    }
}
